package router

import (
	"haodayizhi/controll"
	middleware "haodayizhi/middle_ware"

	"github.com/gin-gonic/gin"
)

func Product(router *gin.RouterGroup) {
	// 产品信息
	router.GET("/info", middleware.AuthMiddleware(), controll.GetProductInfo)
	// 修改产品信息
	router.POST("/update", middleware.AuthMiddleware(), controll.UpdateProductInfo)
	// 获取产品列表
	router.GET("/list", middleware.AuthMiddleware(), controll.GetProductList)
	// 批量上传图片
	router.POST("/upload", middleware.AuthMiddleware(), controll.UploadProductPic)
	// 用户的购买记录
	router.GET("/shop_record", middleware.AuthMiddleware(), controll.ProductBuyRecord)
}
